package cn.yunyichina.provider.finance.creator.journal;

import java.util.ArrayList;
import java.util.List;

import cn.yunyichina.utils.commons.DateUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.yunyichina.provider.finance.creator.FinanceAccountJournalCreator;
import cn.yunyichina.provider.finance.entity.AccountJournalPo;
import cn.yunyichina.provider.finance.entity.BoneOrderBo;
import cn.yunyichina.provider.finance.entity.IntroducerInfoBo;
import cn.yunyichina.provider.framework.dubbo.service.BaseService;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.utils.commons.IDUtils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * 手术单流水
 * <p>
 * 最多11条流水：
 * <br>
 * 1. 主治医生收入<br>
 * 2. 主治医生一级推荐人收入<br>
 * 3. 主治医生二级推荐人收入<br>
 * 4. 专家收入<br>
 * 5. 专家一级推荐人收入<br>
 * 6. 专家二级推荐人收入<br>
 * 7. 平台服务费<br>
 * 8. 手术意外险<br>
 * 9. 主治医生收入折扣（负）<br>
 * 10. 专家收入折扣（负）<br>
 * 11. 平台服务费折扣（负）<br>
 * 
 * @author zhou
 *
 */
public class SurgeryOrderJournal implements FinanceAccountJournalCreator {
	
	private static final Logger logger = LoggerFactory.getLogger(SurgeryOrderJournal.class);
	
	private static final String SURGERY_BUSINESS_DESC = "手术服务费";
	private static final String SURGERY_BUSINESS_DESC_REBATE = "手术服务费折扣";
	private static final String INTRODUCE_BUSINESS_DESC = "引荐费";

	private BoneOrderBo boneOrderBo;

	/**
	 * 手术单流水
	 * 
	 * @param boneOrderBo
	 */
	public SurgeryOrderJournal(BoneOrderBo boneOrderBo) {
		super();
		this.boneOrderBo = boneOrderBo;
	}

	@Override
	public List<AccountJournalPo> createJournal() throws Exception {
		logger.info("即将生成手术单信息");
		
		List<AccountJournalPo> list = new ArrayList<>();
		
		// 生成主治医生相关的流水
		int professorIntroducerFee = createProfessorDoctorJournal(list);
		
		// 生成专家相关的流水
		int appointmentIntroducerFee = createAppointmentDoctorJournal(list);
		
		// 生成平台相关流水
		createPlatformJournal(list, professorIntroducerFee, appointmentIntroducerFee);
		
		return list;
	}

	/**
	 * 生成主治医生相关的流水
	 * 
	 * @param list
	 */
	private int createProfessorDoctorJournal(List<AccountJournalPo> list) throws Exception {
		// 主治医生推荐人的分成费用
		int professorIntroducerFee = 0;
		String professorDoctorId = boneOrderBo.getProfessorDoctorId();
		if (StringUtils.isBlank(professorDoctorId)) {
			// 没有主治医生
			logger.info("该手术单没有主治医生");
			return professorIntroducerFee;
		}
		
		// 1. 主治医生收入
		AccountJournalPo professorAccountJournalPo = new AccountJournalPo();
		professorAccountJournalPo.setId(IDUtils.getUUID32());
		professorAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		professorAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		professorAccountJournalPo.setOrderType(boneOrderBo.getOrderType());

		// 查询主治医生的信息（机构，科室）
		Response response = BaseService.callHumpFromInternal(
				"yyt.base.orguser.relation.get", "{\"user_id\":\""
						+ professorDoctorId + "\"}");
		String result = response.getResult();
		if (StringUtils.isBlank(result)) {
			logger.error("生成手术单（有主治）流水异常，未查询到主治医生信息 userId: " + professorDoctorId);
			throw new Exception("生成手术单（有主治）流水异常，未查询到主治医生信息 userId: " + professorDoctorId);
		}

		logger.info("主治医生信息: " + result);
		JSONObject resultMap = JSON.parseObject(result);
		professorAccountJournalPo.setOrgId(resultMap.getString("orgId"));
		professorAccountJournalPo.setOrgCode(resultMap.getString("orgCode"));
		professorAccountJournalPo.setOrgName(resultMap.getString("orgName"));
		professorAccountJournalPo.setDeptId(resultMap.getString("deptId"));
		professorAccountJournalPo.setDeptCode(resultMap.getString("deptCode"));
		professorAccountJournalPo.setDeptName(resultMap.getString("deptName"));
		professorAccountJournalPo.setUserId(professorDoctorId);
		professorAccountJournalPo.setUserName(resultMap.getString("userName"));
		professorAccountJournalPo.setBusinessDesc(SURGERY_BUSINESS_DESC);
		professorAccountJournalPo.setAmountDirection(Short.valueOf("1"));
		professorAccountJournalPo.setAmount(boneOrderBo.getProfessorDoctorRecvAmount());
		professorAccountJournalPo.setBusinessType((short) 1);
		professorAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		list.add(professorAccountJournalPo);
		
		// 2. 主治折扣
		
		AccountJournalPo professorDiscountAccountJournalPo = new AccountJournalPo();
		professorDiscountAccountJournalPo.setId(IDUtils.getUUID32());
		professorDiscountAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		professorDiscountAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		professorDiscountAccountJournalPo.setOrderType(boneOrderBo.getOrderType());
		professorDiscountAccountJournalPo.setOrgId(resultMap.getString("orgId"));
		professorDiscountAccountJournalPo.setOrgCode(resultMap.getString("orgCode"));
		professorDiscountAccountJournalPo.setOrgName(resultMap.getString("orgName"));
		professorDiscountAccountJournalPo.setDeptId(resultMap.getString("deptId"));
		professorDiscountAccountJournalPo.setDeptCode(resultMap.getString("deptCode"));
		professorDiscountAccountJournalPo.setDeptName(resultMap.getString("deptName"));
		professorDiscountAccountJournalPo.setUserId(professorDoctorId);
		professorDiscountAccountJournalPo.setUserName(resultMap.getString("userName"));
		professorDiscountAccountJournalPo.setBusinessDesc(SURGERY_BUSINESS_DESC_REBATE);
		professorDiscountAccountJournalPo.setBusinessType((short) 9);
		professorDiscountAccountJournalPo.setAmountDirection(Short.valueOf("2"));
		professorDiscountAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		// 产品说：押金单分成，手术单折扣都写死，主治收入80元，入库单位为分
		professorDiscountAccountJournalPo.setAmount(80_00);
		list.add(professorDiscountAccountJournalPo);
				
		// 手术费
		int surgeryFee = boneOrderBo.getAppointmentDoctorRecvAmount();
		
		// 3. 主治推荐人收入
		
		IntroducerInfoBo introducerInfoBo = new IntroducerInfoBo().initWithUserId(professorDoctorId);
		logger.info("主治医生推荐人信息 introducerInfoBo: " + introducerInfoBo);
		String firstIntroducerId = introducerInfoBo.getFirstIntroducerId();
		String secondIntroducerId = introducerInfoBo.getSecondIntroducerId();
		float firstRate = introducerInfoBo.getFirstRate();
		float secondRate = introducerInfoBo.getSecondRate();
		// 有第一级推荐人
		if (StringUtils.isNotBlank(firstIntroducerId)) {
			logger.info("主治医生有一级推荐人");
			AccountJournalPo firstIntroducerJournalPo = new AccountJournalPo();
			firstIntroducerJournalPo.setId(IDUtils.getUUID32());
			firstIntroducerJournalPo.setOrderNo(boneOrderBo.getOrderNo());
			firstIntroducerJournalPo.setRelationNo(boneOrderBo.getRelationNo());
			firstIntroducerJournalPo.setOrderType(boneOrderBo.getOrderType());
			firstIntroducerJournalPo.setOrgId(introducerInfoBo.getFirstIntroducerOrgId());
			firstIntroducerJournalPo.setOrgCode(introducerInfoBo.getFirstIntroducerOrgCode());
			firstIntroducerJournalPo.setOrgName(introducerInfoBo.getFirstIntroducerOrgName());
			firstIntroducerJournalPo.setDeptId(introducerInfoBo.getFirstIntroducerDeptId());
			firstIntroducerJournalPo.setDeptCode(introducerInfoBo.getFirstIntroducerDeptCode());
			firstIntroducerJournalPo.setDeptName(introducerInfoBo.getFirstIntroducerDeptName());
			firstIntroducerJournalPo.setUserId(firstIntroducerId);
			firstIntroducerJournalPo.setUserName(introducerInfoBo.getFirstIntroducerName());
			firstIntroducerJournalPo.setBusinessDesc(INTRODUCE_BUSINESS_DESC);
			firstIntroducerJournalPo.setAmountDirection(Short.valueOf("1"));
			firstIntroducerJournalPo.setBusinessType((short) 2);
			firstIntroducerJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
			float firstIntroducerAmount = surgeryFee * firstRate;
			int firstIntroducerAmountInt = Long.valueOf(Math.round(firstIntroducerAmount)).intValue();
			professorIntroducerFee = (professorIntroducerFee + firstIntroducerAmountInt);
			firstIntroducerJournalPo.setAmount(firstIntroducerAmountInt);
			list.add(firstIntroducerJournalPo);
			
			// 有第二级推荐人
			if (StringUtils.isNotBlank(secondIntroducerId)) {
				logger.info("主治医生有二级推荐人");
				AccountJournalPo secondIntroducerJournalPo = new AccountJournalPo();
				secondIntroducerJournalPo.setId(IDUtils.getUUID32());
				secondIntroducerJournalPo.setOrderNo(boneOrderBo.getOrderNo());
				secondIntroducerJournalPo.setRelationNo(boneOrderBo.getRelationNo());
				secondIntroducerJournalPo.setOrderType(boneOrderBo.getOrderType());
				secondIntroducerJournalPo.setOrgId(introducerInfoBo.getSecondIntroducerOrgId());
				secondIntroducerJournalPo.setOrgCode(introducerInfoBo.getSecondIntroducerOrgCode());
				secondIntroducerJournalPo.setOrgName(introducerInfoBo.getSecondIntroducerOrgName());
				secondIntroducerJournalPo.setDeptId(introducerInfoBo.getSecondIntroducerDeptId());
				secondIntroducerJournalPo.setDeptCode(introducerInfoBo.getSecondIntroducerDeptCode());
				secondIntroducerJournalPo.setDeptName(introducerInfoBo.getSecondIntroducerDeptName());
				secondIntroducerJournalPo.setUserId(secondIntroducerId);
				secondIntroducerJournalPo.setUserName(introducerInfoBo.getSecondIntroducerName());
				secondIntroducerJournalPo.setBusinessDesc(INTRODUCE_BUSINESS_DESC);
				secondIntroducerJournalPo.setAmountDirection(Short.valueOf("1"));
				secondIntroducerJournalPo.setBusinessType((short) 3);
				secondIntroducerJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
				float secondIntroducerAmount = surgeryFee * secondRate;
				int secondIntroducerAmountInt = Long.valueOf(Math.round(secondIntroducerAmount)).intValue();
				professorIntroducerFee = (professorIntroducerFee + secondIntroducerAmountInt);
				secondIntroducerJournalPo.setAmount(secondIntroducerAmountInt);
				list.add(secondIntroducerJournalPo);
			}
		}
		
		return professorIntroducerFee;
	}
	
	/**
	 * 生成专家相关的流水
	 * 
	 * @param list
	 */
	private int createAppointmentDoctorJournal(List<AccountJournalPo> list) throws Exception {
		// 专家推荐人的分成费用
		int appointmentIntroducerFee = 0;
		
		String appointmentDoctorId = boneOrderBo.getAppointmentDoctorId();
		
		// 1. 专家收入
		AccountJournalPo appointmentAccountJournalPo = new AccountJournalPo();
		appointmentAccountJournalPo.setId(IDUtils.getUUID32());
		appointmentAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		appointmentAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		appointmentAccountJournalPo.setOrderType(boneOrderBo.getOrderType());

		// 查询专家的信息（机构，科室）
		Response response = BaseService.callHumpFromInternal(
				"yyt.base.orguser.relation.get", "{\"user_id\":\""
						+ appointmentDoctorId + "\"}");
		String result = response.getResult();
		if (StringUtils.isBlank(result)) {
			logger.error("生成手术单流水异常，未查询到专家信息 userId: " + appointmentDoctorId);
			throw new Exception("生成手术单流水异常，未查询到专家信息 userId: " + appointmentDoctorId);
		}

		logger.info("专家信息: " + result);
		JSONObject resultMap = JSON.parseObject(result);
		appointmentAccountJournalPo.setOrgId(resultMap.getString("orgId"));
		appointmentAccountJournalPo.setOrgCode(resultMap.getString("orgCode"));
		appointmentAccountJournalPo.setOrgName(resultMap.getString("orgName"));
		appointmentAccountJournalPo.setDeptId(resultMap.getString("deptId"));
		appointmentAccountJournalPo.setDeptCode(resultMap.getString("deptCode"));
		appointmentAccountJournalPo.setDeptName(resultMap.getString("deptName"));
		appointmentAccountJournalPo.setUserId(appointmentDoctorId);
		appointmentAccountJournalPo.setUserName(resultMap.getString("userName"));
		appointmentAccountJournalPo.setBusinessDesc(SURGERY_BUSINESS_DESC);
		appointmentAccountJournalPo.setAmountDirection(Short.valueOf("1"));
		appointmentAccountJournalPo.setAmount(boneOrderBo.getAppointmentDoctorRecvAmount());
		appointmentAccountJournalPo.setBusinessType((short) 4);
		appointmentAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		list.add(appointmentAccountJournalPo);
		
		// 2. 专家折扣
		
		AccountJournalPo appointmentDiscountAccountJournalPo = new AccountJournalPo();
		appointmentDiscountAccountJournalPo.setId(IDUtils.getUUID32());
		appointmentDiscountAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		appointmentDiscountAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		appointmentDiscountAccountJournalPo.setOrderType(boneOrderBo.getOrderType());
		appointmentDiscountAccountJournalPo.setOrgId(resultMap.getString("orgId"));
		appointmentDiscountAccountJournalPo.setOrgCode(resultMap.getString("orgCode"));
		appointmentDiscountAccountJournalPo.setOrgName(resultMap.getString("orgName"));
		appointmentDiscountAccountJournalPo.setDeptId(resultMap.getString("deptId"));
		appointmentDiscountAccountJournalPo.setDeptCode(resultMap.getString("deptCode"));
		appointmentDiscountAccountJournalPo.setDeptName(resultMap.getString("deptName"));
		appointmentDiscountAccountJournalPo.setUserId(appointmentDoctorId);
		appointmentDiscountAccountJournalPo.setUserName(resultMap.getString("userName"));
		appointmentDiscountAccountJournalPo.setBusinessDesc(SURGERY_BUSINESS_DESC_REBATE);
		appointmentDiscountAccountJournalPo.setAmountDirection(Short.valueOf("2"));
		appointmentDiscountAccountJournalPo.setBusinessType((short) 10);
		appointmentDiscountAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		// 产品说：押金单分成，手术单折扣都写死，专家收入100元，入库单位为分
		appointmentDiscountAccountJournalPo.setAmount(100_00);
		list.add(appointmentDiscountAccountJournalPo);
				
		// 手术费
		int surgeryFee = boneOrderBo.getAppointmentDoctorRecvAmount();
		
		// 3. 专家推荐人收入
		
		IntroducerInfoBo introducerInfoBo = new IntroducerInfoBo().initWithUserId(appointmentDoctorId);
		logger.info("专家推荐人信息 introducerInfoBo: " + introducerInfoBo);
		String firstIntroducerId = introducerInfoBo.getFirstIntroducerId();
		String secondIntroducerId = introducerInfoBo.getSecondIntroducerId();
		float firstRate = introducerInfoBo.getFirstRate();
		float secondRate = introducerInfoBo.getSecondRate();
		// 有第一级推荐人
		if (StringUtils.isNotBlank(firstIntroducerId)) {
			logger.info("专家有一级推荐人");
			AccountJournalPo firstIntroducerJournalPo = new AccountJournalPo();
			firstIntroducerJournalPo.setId(IDUtils.getUUID32());
			firstIntroducerJournalPo.setOrderNo(boneOrderBo.getOrderNo());
			firstIntroducerJournalPo.setRelationNo(boneOrderBo.getRelationNo());
			firstIntroducerJournalPo.setOrderType(boneOrderBo.getOrderType());
			firstIntroducerJournalPo.setOrgId(introducerInfoBo.getFirstIntroducerOrgId());
			firstIntroducerJournalPo.setOrgCode(introducerInfoBo.getFirstIntroducerOrgCode());
			firstIntroducerJournalPo.setOrgName(introducerInfoBo.getFirstIntroducerOrgName());
			firstIntroducerJournalPo.setDeptId(introducerInfoBo.getFirstIntroducerDeptId());
			firstIntroducerJournalPo.setDeptCode(introducerInfoBo.getFirstIntroducerDeptCode());
			firstIntroducerJournalPo.setDeptName(introducerInfoBo.getFirstIntroducerDeptName());
			firstIntroducerJournalPo.setUserId(firstIntroducerId);
			firstIntroducerJournalPo.setUserName(introducerInfoBo.getFirstIntroducerName());
			firstIntroducerJournalPo.setBusinessDesc(INTRODUCE_BUSINESS_DESC);
			firstIntroducerJournalPo.setAmountDirection(Short.valueOf("1"));
			firstIntroducerJournalPo.setBusinessType((short) 5);
			firstIntroducerJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
			float firstIntroducerAmount = surgeryFee * firstRate;
			int firstIntroducerAmountInt = Long.valueOf(Math.round(firstIntroducerAmount)).intValue();
			appointmentIntroducerFee = (appointmentIntroducerFee + firstIntroducerAmountInt);
			firstIntroducerJournalPo.setAmount(firstIntroducerAmountInt);
			list.add(firstIntroducerJournalPo);
			
			// 有第二级推荐人
			if (StringUtils.isNotBlank(secondIntroducerId)) {
				logger.info("专家有二级推荐人");
				AccountJournalPo secondIntroducerJournalPo = new AccountJournalPo();
				secondIntroducerJournalPo.setId(IDUtils.getUUID32());
				secondIntroducerJournalPo.setOrderNo(boneOrderBo.getOrderNo());
				secondIntroducerJournalPo.setRelationNo(boneOrderBo.getRelationNo());
				secondIntroducerJournalPo.setOrderType(boneOrderBo.getOrderType());
				secondIntroducerJournalPo.setOrgId(introducerInfoBo.getSecondIntroducerOrgId());
				secondIntroducerJournalPo.setOrgCode(introducerInfoBo.getSecondIntroducerOrgCode());
				secondIntroducerJournalPo.setOrgName(introducerInfoBo.getSecondIntroducerOrgName());
				secondIntroducerJournalPo.setDeptId(introducerInfoBo.getSecondIntroducerDeptId());
				secondIntroducerJournalPo.setDeptCode(introducerInfoBo.getSecondIntroducerDeptCode());
				secondIntroducerJournalPo.setDeptName(introducerInfoBo.getSecondIntroducerDeptName());
				secondIntroducerJournalPo.setUserId(secondIntroducerId);
				secondIntroducerJournalPo.setUserName(introducerInfoBo.getSecondIntroducerName());
				secondIntroducerJournalPo.setBusinessDesc(INTRODUCE_BUSINESS_DESC);
				secondIntroducerJournalPo.setAmountDirection(Short.valueOf("1"));
				secondIntroducerJournalPo.setBusinessType((short) 6);
				secondIntroducerJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
				float secondIntroducerAmount = surgeryFee * secondRate;
				int secondIntroducerAmountInt = Long.valueOf(Math.round(secondIntroducerAmount)).intValue();
				appointmentIntroducerFee = (appointmentIntroducerFee + secondIntroducerAmountInt);
				secondIntroducerJournalPo.setAmount(secondIntroducerAmountInt);
				list.add(secondIntroducerJournalPo);
			}
		}
		
		return appointmentIntroducerFee;
	}

	/**
	 * 生成平台相关流水
	 * 
	 * @param list
	 */
	private void createPlatformJournal(List<AccountJournalPo> list,
			int professorIntroducerFee, int appointmentIntroducerFee)
			throws Exception {
		// 1. 平台服务费
		AccountJournalPo platformAccountJournalPo = new AccountJournalPo();
		platformAccountJournalPo.setId(IDUtils.getUUID32());
		platformAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		platformAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		platformAccountJournalPo.setOrderType(boneOrderBo.getOrderType());
		platformAccountJournalPo.setOrgId(boneOrderBo.getPlatformId());
		platformAccountJournalPo.setOrgCode(boneOrderBo.getPlatformCode());
		platformAccountJournalPo.setOrgName(boneOrderBo.getPlatformName());
		platformAccountJournalPo.setBusinessDesc("手术单平台收入");
		platformAccountJournalPo.setAmountDirection(Short.valueOf("1"));
		platformAccountJournalPo.setBusinessType((short) 7);
		platformAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		// 平台收入=平台服务费-主治推荐人分成-专家推荐人分成
		int platformServiceFee = boneOrderBo.getPlatformServiceFee() - professorIntroducerFee - appointmentIntroducerFee;
		platformAccountJournalPo.setAmount(platformServiceFee);
		list.add(platformAccountJournalPo);
		
		// 2. 平台折扣
		AccountJournalPo platformDiscountAccountJournalPo = new AccountJournalPo();
		platformDiscountAccountJournalPo.setId(IDUtils.getUUID32());
		platformDiscountAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
		platformDiscountAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
		platformDiscountAccountJournalPo.setOrderType(boneOrderBo.getOrderType());
		platformDiscountAccountJournalPo.setOrgId(boneOrderBo.getPlatformId());
		platformDiscountAccountJournalPo.setOrgCode(boneOrderBo.getPlatformCode());
		platformDiscountAccountJournalPo.setOrgName(boneOrderBo.getPlatformName());
		platformDiscountAccountJournalPo.setBusinessDesc("手术单平台折扣");
		platformDiscountAccountJournalPo.setAmountDirection(Short.valueOf("2"));
		platformDiscountAccountJournalPo.setBusinessType((short) 11);
		platformDiscountAccountJournalPo.setCreatedTime(DateUtils.getDateTimeStr());
		// 有主治折扣20，无主治折扣100
		String professorDoctorId = boneOrderBo.getProfessorDoctorId();
		platformDiscountAccountJournalPo.setAmount(StringUtils.isBlank(professorDoctorId) ? 100_00 : 20_00);
		list.add(platformDiscountAccountJournalPo);
		
//		// 3. 手术意外险
//		AccountJournalPo surgeryAccountJournalPo = new AccountJournalPo();
//		surgeryAccountJournalPo.setId(IDUtils.getUUID32());
//		surgeryAccountJournalPo.setOrderNo(boneOrderBo.getOrderNo());
//		surgeryAccountJournalPo.setRelationNo(boneOrderBo.getRelationNo());
//		surgeryAccountJournalPo.setOrderType(boneOrderBo.getOrderType());
//		surgeryAccountJournalPo.setOrgId(boneOrderBo.getPlatformId());
//		surgeryAccountJournalPo.setOrgCode(boneOrderBo.getPlatformCode());
//		surgeryAccountJournalPo.setOrgName(boneOrderBo.getPlatformName());
//		surgeryAccountJournalPo.setBusinessDesc("手术意外险");
//		surgeryAccountJournalPo.setAmountDirection(Short.valueOf("1"));
//		surgeryAccountJournalPo.setAmount(boneOrderBo.getSurgeryAccidentFee());
//		surgeryAccountJournalPo.setBusinessType((short) 8);
//		list.add(surgeryAccountJournalPo);
	}

}
